import { lazy } from "react";

const Main = lazy(() => import("./Main"));
const Login = lazy(() => import("./Login"));
const Home = lazy(() => import("./Home"));
const One = lazy(() => import("./One"));
const Register = lazy(() => import("./Register"));

// 路由表
export default [
	{
		path: "/",
		isLogin: true,
		component: Main,
		children: [
			{
				path: "home",
				isLogin: true,
				component: Home,
			},
			{
				path: "one",
				isLogin: true,
				component: One,
			},
		],
	},
	{
		path: "login",
		isLogin: false,
		component: Login,
	},
	{
		path: "register",
		isLogin: false,
		component: Register,
	},
	{
		path: "*",
		isLogin: true,
		component: Main,
	},
];
